//
//  MVTypeModel.m
//  NewMusic
//
//  Created by dllo on 15/11/21.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "MVTypeModel.h"

@implementation MVTypeModel
+(MVTypeModel*)shareMVTypeModel{
    static MVTypeModel *model = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (model == nil) {
            model = [[MVTypeModel alloc]init];
        }
    });
    return model;
}

-(instancetype)initWithDictionary:(NSDictionary *)dictionary {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
-(void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.ID = [NSString stringWithFormat:@"%@", value];
    }
}
-(void)setValue:(id)value forKey:(NSString *)key {
    if ([key isEqualToString:@"parentId"]) {
        self.parentId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"order"]) {
        self.order = [NSString stringWithFormat:@"%@", value];
    }else {
        [super setValue:value forKey:key];
    }
}
@end
